import service from "@/utils/request";
import serverConfig from "@/utils/serverConfig";
// 获取所有推荐
export const getRecommend = () => {
  return service({
    method: "get",
    url: "/v1/recommend",
  });
};
// 获取所有推荐的图片
export const getRecommendImg = () => {
  return service({
    method: "get",
    url: "/v1/recommendImg",
  });
};
// 发布送养
export const addsubmit = data => {
  return service({
    method: "post",
    url: "/api/v1/addsubmit",
    data,
  });
};

// 获取宠物分类所有数据
export const getTypeAll = () => {
  return service({
    method: "get",
    url: "/api/v1/getPetMessage",
  });
};
// 获取宠物分类所有数据图片
export const getTypeAllImg = () => {
  return service({
    method: "get",
    url: "/api/v1/getPetImg",
  });
};

// 根据类型获取宠物信息
export const getType = params => {
  return service({
    method: "get",
    url: "/api/v1/getTypeMessage",
    params,
  });
};

// 根据nid获取一条送养信息
export const getSinglePetMessage = params => {
  return service({
    method: "get",
    url: "/api/v1/getSinglePetMessage",
    params,
  });
};

// 根据nid获取一条推荐信息
export const getSingleRe = params => {
  return service({
    method: "get",
    url: "/v1/getSingleRe",
    params,
  });
};

//添加足迹
export const getaddFade = (data)=>{
  return service({
    method:'post',
    url:'/api/v1/addFade',
    data
  })
}
//根据uid获取所有足迹
export const getAllFade = params => {
  return service({
    method: "get",
    url: "/api/v1/getAllFade",
    params,
  });
};